package com.honghu.cloud.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

import com.honghu.cloud.interceptor.LoginWxInterceptor;

@Configuration
public class WebConfig implements WebMvcConfigurer {

	/**
	 * 添加spring中的拦截器
	 */
	@Override
	public void addInterceptors(InterceptorRegistry registry) {
		registry.addInterceptor(new LoginWxInterceptor()).addPathPatterns("/**")
				.excludePathPatterns("/**/apiForFeign/**")// 排除feign调用的url配置
				.excludePathPatterns("/**/brand_items").excludePathPatterns("/**/secKillTimer/**");
		
				
	}

}
